<template>
  <div id="frontPage">
    <frontcarousel></frontcarousel>
    <transport-business></transport-business>
    <!--<transportQuery></transportQuery>-->
    <trackingCode></trackingCode>
    <newsBulletin></newsBulletin>
    <ourPartners></ourPartners>
    <asideMenu></asideMenu>
    <div style="margin-top: 20px" v-if="!currentUser.userId">
      <div id="mianDeng">
        <p>300+ 项功能免费使用，让您 0 门槛进入多式联运的时代</p>
        <p>
          <router-link :to="{path: '/user/reg'}">
            免费注册
          </router-link>
        </p>
      </div>
    </div>
  </div>
</template>
<script>
  import frontcarousel from './components/frontCarousel.vue'
  import transportBusiness from './components/transportBusiness.vue'
  // import transportQuery from './components/transportQuery.vue'
  import trackingCode from './components/trackingCode.vue'
  import newsBulletin from './components/newsBulletin.vue'
  import ourPartners from './components/ourPartners.vue'
  import asideMenu from './components/asideMenu.vue'
  import { mapGetters } from 'vuex'

  export default {
    name: 'index',
    data () {
      let datas = {}
      return datas
    },
    methods: {},
    computed: {
      ...mapGetters(['currentUser'])
    },
    components: { frontcarousel, transportBusiness, trackingCode, newsBulletin, ourPartners, asideMenu }
  }
</script>
<style scoped>
  #mianDeng {
    width: 960px;
    height: 160px;
    position: absolute;
    left: 50%;
    margin-top: -50px;
    margin-left: -480px;
    background: #feca2e;
    border-bottom-left-radius: 25px;
    border-top-right-radius: 25px;
    z-index: 100;
    text-align: center;
  }

  #mianDeng > p:first-of-type {
    margin-top: 30px;
    font-size: 22px;
    color: #1b1e21;
  }

  #mianDeng > p:last-of-type {
    width: 120px;
    height: 40px;
    margin: 0 auto;
    margin-top: 30px;
    background-color: #1b1e21;
    line-height: 40px;
  }

  #mianDeng a {
    text-decoration: none;
    color: #feca2e;
    font-size: 16px;
  }
</style>
